import request from '@/utils/request'
import { downloadAction } from '@/api/requestEvents'

//获得重点项目进展分页
export function progressPage(params: any) {
  return request({
    url: '/project/key/project-progress/page',
    method: 'get',
    params,
  })
}

//创建重点项目进展
export function progressCreate(data: any) {
  return request({
    url: '/project/key/project-progress/create',
    method: 'post',
    data,
  })
}

//更新重点项目进展
export function progressUpdate(data: any) {
  return request({
    url: '/project/key/project-progress/update',
    method: 'put',
    data,
  })
}

//获得重点项目进展详情
export function progressGet(params: any) {
  return request({
    url: '/project/key/project-progress/get',
    method: 'get',
    params,
  })
}

//导出重点项目进展 Excel
export function exportProjectProgress(params: any) {
  downloadAction(
    '/project/key/project-progress/export-excel',
    'get',
    params,
    '重点项目进展列表.xls'
  )
}
